package com.shop.shoporder.mapper;

import com.shop.shoporder.entity.GroupbuyParticipate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface GroupbuyParticipateMapper {
    int deleteByPrimaryKey(int participateId);

    int insert(GroupbuyParticipate record);

    int insertSelective(GroupbuyParticipate record);

    GroupbuyParticipate selectByPrimaryKey(int participateId);

    int updateByPrimaryKeySelective(GroupbuyParticipate record);

    int updateByPrimaryKey(GroupbuyParticipate record);

    //查询该团购的参与人数
    List<GroupbuyParticipate> getGroupbuyParticipate(int groupbuyId);

    //查询用户参与的团购但没有成功
    GroupbuyParticipate getGroupbuyPartied(@Param("groupbuyId") int groupbuyId, @Param("userNoId") int userNoId);


}